#
# for apache mod_wsgi
#

import os, sys

app_startup_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(app_startup_dir)
if app_startup_dir not in sys.path:
	sys.path.append(app_startup_dir)

import bottle
from session import BlogSessionMiddleware
import views

bottle.TEMPLATE_PATH.insert(0, os.path.join(app_startup_dir, 'views'))
application = BlogSessionMiddleware(bottle.default_app())

